﻿<UserControl x:Class="tsge.Controls.CharacterEditor"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:local="clr-namespace:tsge.Classes"
             xmlns:controls="clr-namespace:tsge.Controls"
             xmlns:System="clr-namespace:System;assembly=mscorlib"
             mc:Ignorable="d" 
             d:DesignHeight="400" d:DesignWidth="525" 
             HorizontalContentAlignment="Center" VerticalContentAlignment="Center" 
             HorizontalAlignment="Center" VerticalAlignment="Center">
    
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
            User Control Resources
     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

    <UserControl.Resources>
        <!-- Color To Brush Converter -->
        <local:ColorToBrushConverter x:Key="ColorToBrushConverter" />
        
        <!-- Buff Item Template -->
        <DataTemplate x:Key="BuffItemTemplate" DataType="{x:Type local:Buff}">
            <Grid x:Name="LayoutRoot">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Image x:Name="imgBuffIcon" Grid.Column="0" Margin="5" Width="24" Height="24" MaxWidth="24" MaxHeight="24" Source="{Binding Path=Icon}" />
                <Label Grid.Column="1" Content="{Binding Path=Name}" HorizontalAlignment="Left" VerticalAlignment="Center" />
            </Grid>
        </DataTemplate>
        
        <!-- Buff Entry Template -->
        <DataTemplate x:Key="BuffEntryTemplate" DataType="{x:Type local:Buff}">
            <Grid x:Name="LayoutRoot">
                <Border BorderThickness="2" BorderBrush="Black">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Image x:Name="imgBuffIcon" Grid.Column="0" Margin="5" Width="48" Height="48" MaxWidth="48" MaxHeight="48" Source="{Binding Path=Icon}" />
                        <Grid Grid.Column="1">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Label Grid.Row="0" x:Name="lblBuffName" Margin="5" Content="{Binding Path=Name}" />
                            <Label Grid.Row="1" x:Name="lblBuffDuration" Content="{Binding Path=DurationString}" Margin="5" FontWeight="Normal" />
                        </Grid>
                    </Grid>
                </Border>
            </Grid>
        </DataTemplate>
    </UserControl.Resources>

            
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
            Player Info
     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
            
    <Grid>
        <TabControl Grid.Row="1" Height="Auto" HorizontalAlignment="Stretch" Margin="10" VerticalAlignment="Stretch" Width="Auto">
            <TabItem Header="Player">
                <Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>

                        <GroupBox Grid.Column="0" Grid.Row="0" Header="Player" Foreground="Chartreuse">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>

                                <Label Grid.Column="0" Grid.Row="0" Content="Player Name:" FontWeight="Normal" HorizontalContentAlignment="Right" VerticalAlignment="Center" HorizontalAlignment="Right" Foreground="White" />
                                <Label Grid.Column="0" Grid.Row="1" Content="Difficulty:" FontWeight="Normal" HorizontalContentAlignment="Right" HorizontalAlignment="Right" Foreground="White" VerticalAlignment="Center" />

                                <TextBox x:Name="txtPlayerName" Grid.Column="1" Grid.Row="0" Margin="5" Text="{Binding Path=Name, Mode=TwoWay}" />
                                <ComboBox x:Name="cboDifficulty" Grid.Column="1" Grid.Row="1" Margin="5" SelectedIndex="{Binding Path=Difficulty, Mode=TwoWay}" />
                                <CheckBox x:Name="chkIsMale" Grid.Column="1" Grid.Row="2" Content="Is Male?" Margin="5,0,0,0" IsChecked="{Binding Path=IsMale, Mode=TwoWay}" />
                                <CheckBox x:Name="chkIsHotbarLocked" Grid.Column="1" Grid.Row="3" Content="Hotbar Locked?" Margin="5,0,0,0" IsChecked="{Binding Path=IsHotbarLocked, Mode=TwoWay}" />
                            </Grid>
                        </GroupBox>

                        <GroupBox Grid.Column="1" Grid.Row="0" Header="Health / Mana" Foreground="Chartreuse" Margin="5,0,0,0" Width="250">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="15" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>

                                <Label Grid.Column="0" Grid.Row="0" Content="Health:" FontWeight="Normal" HorizontalContentAlignment="Right" VerticalAlignment="Center" HorizontalAlignment="Right" Foreground="White" />
                                <Label Grid.Column="0" Grid.Row="1" Content="Mana:" FontWeight="Normal" HorizontalContentAlignment="Right" VerticalAlignment="Center" HorizontalAlignment="Right" Foreground="White" />

                                <Label x:Name="lblHealth" Grid.Column="2" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" Content="50/100" Foreground="White" FontWeight="Normal" UseLayoutRounding="True" />
                                <Label x:Name="lblMana" Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" Content="50/100" Foreground="White" FontWeight="Normal" UseLayoutRounding="True" />
                                <ProgressBar x:Name="pbHealth" Grid.Column="1" Grid.Row="0" Margin="2,2,5,2" SmallChange="1" Minimum="1" Value="{Binding Path=Health, Mode=TwoWay}" Maximum="{Binding Path=HealthMax, Mode=TwoWay}" ValueChanged="pbHealth_ValueChanged" MouseLeftButtonUp="pbHealth_MouseLeftButtonUp" MouseMove="pbHealth_MouseMove"  />
                                <ProgressBar x:Name="pbMana" Grid.Column="1" Grid.Row="1" Margin="2,2,5,2" SmallChange="1" Foreground="CornflowerBlue" Minimum="0" Value="{Binding Path=Mana, Mode=TwoWay}" Maximum="{Binding Path=ManaMax, Mode=TwoWay}" ValueChanged="pbMana_ValueChanged" MouseLeftButtonUp="pbMana_MouseLeftButtonUp" MouseMove="pbMana_MouseMove" />

                                <Label Grid.Column="0" Grid.Row="4" Content="Max Health:" FontWeight="Normal" HorizontalContentAlignment="Right" VerticalAlignment="Center" HorizontalAlignment="Right" Foreground="White" />
                                <Label Grid.Column="0" Grid.Row="5" Content="Max Mana:" FontWeight="Normal" HorizontalContentAlignment="Right" VerticalAlignment="Center" HorizontalAlignment="Right" Foreground="White" />

                                <ProgressBar x:Name="pbMaxHealth" Grid.Column="1" Grid.Row="4" Margin="2,2,5,2" Minimum="1" Maximum="1000" SmallChange="1" Value="{Binding Path=HealthMax, Mode=TwoWay}" ValueChanged="pbMaxHealth_ValueChanged" MouseLeftButtonUp="pbMaxHealth_MouseLeftButtonUp" MouseMove="pbMaxHealth_MouseMove" />
                                <ProgressBar x:Name="pbMaxMana" Grid.Column="1" Grid.Row="5" Foreground="CornflowerBlue" Margin="2,2,5,2" SmallChange="1" Minimum="0" Maximum="1000" Value="{Binding Path=ManaMax, Mode=TwoWay}" ValueChanged="pbMaxMana_ValueChanged" MouseLeftButtonUp="pbMaxMana_MouseLeftButtonUp" MouseMove="pbMaxMana_MouseMove" />
                                <Label x:Name="lblMaxHealth" Grid.Column="2" Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center" Content="50/100" Foreground="White" FontWeight="Normal" UseLayoutRounding="True" />
                                <Label x:Name="lblMaxMana" Grid.Column="2" Grid.Row="5" HorizontalAlignment="Center" VerticalAlignment="Center" Content="50/100" Foreground="White" FontWeight="Normal" UseLayoutRounding="True" />

                            </Grid>
                        </GroupBox>

                        <GroupBox Grid.ColumnSpan="2" Grid.Row="1" Header="Colors" Padding="0,0,5,0" Foreground="Chartreuse">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="*" />
                                </Grid.RowDefinitions>

                                <controls:ModelViewer x:Name="modelViewer" Grid.Column="2" Grid.RowSpan="8" Height="200" Width="125"/>

                                <Label Grid.Column="0" Grid.Row="0" Content="Hair Color:" FontWeight="Normal" HorizontalContentAlignment="Right" VerticalAlignment="Center" HorizontalAlignment="Right" Foreground="White" Margin="0,5,4,5" VerticalContentAlignment="Center" />
                                <Label Grid.Column="0" Grid.Row="1" Content="Skin Color:" FontWeight="Normal" HorizontalContentAlignment="Right" HorizontalAlignment="Right" Foreground="White" VerticalAlignment="Center" Margin="0,5,4,5" VerticalContentAlignment="Center" />
                                <Label Grid.Column="0" Grid.Row="2" Content="Eyes Color:" FontWeight="Normal" HorizontalContentAlignment="Right" HorizontalAlignment="Right" Foreground="White" VerticalAlignment="Center" Margin="0,5,4,5" VerticalContentAlignment="Center" />
                                <Label Grid.Column="0" Grid.Row="3" Content="Shirt Color:" FontWeight="Normal" HorizontalContentAlignment="Right" HorizontalAlignment="Right" Foreground="White" VerticalAlignment="Center" Margin="0,5,4,5" VerticalContentAlignment="Center" />
                                <Label Grid.Column="0" Grid.Row="4" Content="Undershirt Color:" FontWeight="Normal" HorizontalContentAlignment="Right" HorizontalAlignment="Right" Foreground="White" VerticalAlignment="Center" Margin="0,5,4,5" VerticalContentAlignment="Center" />
                                <Label Grid.Column="0" Grid.Row="5" Content="Pants Color:" FontWeight="Normal" HorizontalContentAlignment="Right" HorizontalAlignment="Right" Foreground="White" VerticalAlignment="Center" Margin="0,5,4,5" VerticalContentAlignment="Center" />
                                <Label Grid.Column="0" Grid.Row="6" Content="Shoes Color:" FontWeight="Normal" HorizontalContentAlignment="Right" HorizontalAlignment="Right" Foreground="White" VerticalAlignment="Center" Margin="0,5,4,5" VerticalContentAlignment="Center" />

                                <Rectangle x:Name="rcColorHair" Grid.Column="1" Grid.Row="0" Margin="0" Width="100" HorizontalAlignment="Stretch" VerticalAlignment="Center" Stroke="Black" Fill="{Binding Path=HairColor, Mode=TwoWay, Converter={StaticResource ColorToBrushConverter}}" Height="20" SnapsToDevicePixels="True" UseLayoutRounding="True" MouseLeftButtonUp="rcColorHair_MouseLeftButtonUp" />                                    
                                <Rectangle x:Name="rcColorSkin" Grid.Column="1" Grid.Row="1" Margin="0" Width="100" HorizontalAlignment="Stretch" VerticalAlignment="Center" Stroke="Black" Fill="{Binding Path=SkinColor, Mode=TwoWay, Converter={StaticResource ColorToBrushConverter}}" Height="20" SnapsToDevicePixels="True" UseLayoutRounding="True" MouseLeftButtonUp="rcColorSkin_MouseLeftButtonUp" />
                                <Rectangle x:Name="rcColorEyes" Grid.Column="1" Grid.Row="2" Margin="0" Width="100" HorizontalAlignment="Stretch" VerticalAlignment="Center" Stroke="Black" Fill="{Binding Path=EyeColor, Mode=TwoWay, Converter={StaticResource ColorToBrushConverter}}" Height="20" SnapsToDevicePixels="True" UseLayoutRounding="True" MouseLeftButtonUp="rcColorEyes_MouseLeftButtonUp" />
                                <Rectangle x:Name="rcColorShirt" Grid.Column="1" Grid.Row="3" Margin="0" Width="100" HorizontalAlignment="Stretch" VerticalAlignment="Center" Stroke="Black" Fill="{Binding Path=ShirtColor, Mode=TwoWay, Converter={StaticResource ColorToBrushConverter}}" Height="20" SnapsToDevicePixels="True" UseLayoutRounding="True" MouseLeftButtonUp="rcColorShirt_MouseLeftButtonUp" />
                                <Rectangle x:Name="rcColorUnderShirt" Grid.Column="1" Grid.Row="4" Margin="0" Width="100" HorizontalAlignment="Stretch" VerticalAlignment="Center" Stroke="Black" Height="20" Fill="{Binding Path=UnderShirtColor, Mode=TwoWay, Converter={StaticResource ColorToBrushConverter}}" SnapsToDevicePixels="True" UseLayoutRounding="True" MouseLeftButtonUp="rcColorUnderShirt_MouseLeftButtonUp" />
                                <Rectangle x:Name="rcColorPants" Grid.Column="1" Grid.Row="5" Margin="0" Width="100" HorizontalAlignment="Stretch" VerticalAlignment="Center" Stroke="Black" Fill="{Binding Path=PantsColor, Mode=TwoWay, Converter={StaticResource ColorToBrushConverter}}" Height="20" SnapsToDevicePixels="True" UseLayoutRounding="True" MouseLeftButtonUp="rcColorPants_MouseLeftButtonUp" />
                                <Rectangle x:Name="rcColorShoes" Grid.Column="1" Grid.Row="6" Margin="0" Width="100" HorizontalAlignment="Stretch" VerticalAlignment="Center" Stroke="Black" Fill="{Binding Path=ShoesColor, Mode=TwoWay, Converter={StaticResource ColorToBrushConverter}}" Height="20" SnapsToDevicePixels="True" UseLayoutRounding="True" MouseLeftButtonUp="rcColorShoes_MouseLeftButtonUp" />


                                <Button x:Name="btnRandomHair" Grid.Column="4" Grid.Row="1" Content="Random Hair" Margin="0,0,5,0" />
                                <Button x:Name="btnRandomColors" Grid.Column="4" Grid.Row="3" Content="Random Colors" Margin="0,0,5,0" />

                            </Grid>
                        </GroupBox>
                    </Grid>
                </Grid>
            </TabItem>

            
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
            Buffs
     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
            
            <TabItem Header="Buffs">
                <Grid>
                    <GroupBox Grid.Column="0" Header="Buffs" Padding="0,0,5,0" Foreground="Chartreuse">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>

                            <ListBox Grid.Column="0" x:Name="lstBuffEntries" Width="250"
                                     ItemsSource="{Binding Path=Buffs, Mode=TwoWay}"
                                     ItemTemplate="{StaticResource BuffEntryTemplate}"
                                     SelectedValuePath="{Binding Path=Index}"
                                     SelectedIndex="-1"
                                     />

                            <Grid Grid.Column="1">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>

                                <ListBox x:Name="lstBuffList" Grid.Column="1" Grid.Row="0" Margin="10,0,0,0" VerticalAlignment="Top" Height="225" HorizontalContentAlignment="Left" 
                                         SelectedValuePath="Id" 
                                         ItemTemplate="{StaticResource BuffItemTemplate}"
                                         MouseLeftButtonUp="lstBuffList_MouseLeftButtonUp"
                                         />

                                <Button x:Name="btnRemoveAllBuffs" Grid.Column="1" Grid.Row="1" Margin="10,2,0,2" Content="Remove All Buffs" Click="btnRemoveAllBuffs_Click"  />
                                <Button x:Name="btnHackedDurations" Grid.Column="1" Grid.Row="2" Margin="10,2,0,2" Content="Set Buffs To 30 Minutes" Click="btnHackedDurations_Click" />
                                <Button x:Name="btnMaxBuffDurations" Grid.Column="1" Grid.Row="3" Margin="10,2,0,2" Content="Max Buff Durations" Click="btnMaxBuffDurations_Click" />
                            </Grid>
                        </Grid>
                    </GroupBox>
                </Grid>
            </TabItem>

            
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
            Inventory
     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
            
            <TabItem Header="Inv.">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                    
                    <ListBox x:Name="lstInventoryEntries" Grid.Row="0"
                             ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                             ItemsSource="{Binding Path=Inventory, Mode=TwoWay}"
                             SelectedIndex="-1"
                             SelectionChanged="lstInventoryEntries_SelectionChanged"
                             MouseRightButtonUp="lstInventoryEntries_MouseRightButtonUp">
                        <ListBox.ItemsPanel>
                            <ItemsPanelTemplate>
                                <WrapPanel />
                            </ItemsPanelTemplate>
                        </ListBox.ItemsPanel>
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Border BorderBrush="Black" BorderThickness="1" Margin="0" Padding="0" ToolTipService.ToolTip="{Binding}">
                                    <Grid>
                                        <Image Margin="0" Width="34" Height="34" Source="{Binding Path=Icon}" Stretch="None" HorizontalAlignment="Center" VerticalAlignment="Center" />
                                        <Border BorderThickness="0" Background="#99000000" Height="14" HorizontalAlignment="Stretch" VerticalAlignment="Bottom">
                                            <Label Content="{Binding Path=Count}" Foreground="White" HorizontalAlignment="Left" VerticalAlignment="Bottom" Padding="0" Margin="0" />
                                        </Border>
                                    </Grid>
                                </Border>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                    
                    <GroupBox Grid.Row="1" Header="Item Editor" Foreground="Chartreuse">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="200" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            
                            <Grid Grid.Column="0">
                                <StackPanel>
                                    <Label Content="Select Item" Foreground="White" FontWeight="Normal" />
                                    <ComboBox x:Name="cboInventoryItem" Margin="10,5" SelectionChanged="cboInventoryItem_SelectionChanged" />
                                    <Label Content="Select Prefix" Foreground="White" FontWeight="Normal" />
                                    <ComboBox x:Name="cboInventoryPrefix" Margin="10,5" 
                                              MouseUp="cboInventoryPrefix_MouseUp" 
                                              SelectionChanged="cboInventoryPrefix_SelectionChanged"
                                              />
                                    <StackPanel Orientation="Horizontal">
                                        <Label Content="Stack Amount" Foreground="White" FontWeight="Normal" VerticalAlignment="Center" />
                                        <TextBox x:Name="txtInventoryAmount" Margin="10,5" MaxLength="3" Width="100"
                                                 ContextMenu="{x:Null}" PreviewKeyDown="txtInventoryAmount_PreviewKeyDown" TextChanged="txtInventoryAmount_TextChanged" />
                                    </StackPanel>
                                </StackPanel>
                            </Grid>
                                                       
                            <Grid Grid.Column="1" Grid.ColumnSpan="2">
                                <StackPanel>
                                    <Button x:Name="btnDeleteAllItems" Content="Delete All Items" Margin="5" Click="btnDeleteAllItems_Click" />
                                    <Button x:Name="btnSetMaxStacks" Content="Set All Items To Max Stack" Margin="5" Click="btnSetMaxStacks_Click" />
                                    <Button x:Name="btnSetHackedStacks" Content="Set All Stacks To 999" Margin="5" Click="btnSetHackedStacks_Click" />
                                </StackPanel>
                            </Grid>
                            
                        </Grid>
                    </GroupBox>
                </Grid>

            </TabItem>

            
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
            Equipment
     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
            
            <TabItem Header="Equip">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="200" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>

                    <GroupBox Grid.Column="0" Header="Select Item" Foreground="Chartreuse">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                        
                            <ListBox x:Name="lstEquipmentList" Grid.Row="0" Margin="5"
                                     HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                     HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
                                     MouseUp="lstEquipmentList_MouseUp"
                                     />

                            <ComboBox x:Name="cboEquipmentPrefixList" Grid.Row="1" Margin="5"
                                      HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                      HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
                                      MouseUp="cboEquipmentPrefixList_MouseUp"
                                      SelectionChanged="cboEquipmentPrefixList_SelectionChanged"
                                      />


                        </Grid>
                    </GroupBox>
                    
                    <Grid Grid.Column="1">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        
                        <GroupBox Grid.Row="0" Header="Equipment" Foreground="Chartreuse" Margin="5,0,0,0">
                            <ListBox x:Name="lstEquipmentArmor" Grid.Row="0"
                                     ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                                     ItemsSource="{Binding Path=Armor, Mode=TwoWay}"
                                     SelectedIndex="-1"
                                     MouseUp="lstEquipmentArmor_MouseUp"
                                     SelectionChanged="lstEquipmentArmor_SelectionChanged">
                                <ListBox.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <WrapPanel />
                                    </ItemsPanelTemplate>
                                </ListBox.ItemsPanel>
                                <ListBox.ItemTemplate>
                                    <DataTemplate>
                                        <Border BorderBrush="Black" BorderThickness="1" Margin="0" Padding="0" ToolTipService.ToolTip="{Binding}">
                                            <Grid>
                                                <Image Margin="0" Width="34" Height="34" Source="{Binding Path=Icon}" Stretch="Uniform" HorizontalAlignment="Center" VerticalAlignment="Center" />
                                            </Grid>
                                        </Border>
                                    </DataTemplate>
                                </ListBox.ItemTemplate>
                            </ListBox>
                        </GroupBox>

                        <GroupBox Grid.Row="1" Header="Vanity" Foreground="Chartreuse" Margin="5,0,0,0">
                            <ListBox x:Name="lstEquipmentVanity" Grid.Row="0"
                                     ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                                     ItemsSource="{Binding Path=Vanity, Mode=TwoWay}"
                                     SelectedIndex="-1"
                                     MouseUp="lstEquipmentVanity_MouseUp"
                                     SelectionChanged="lstEquipmentVanity_SelectionChanged">
                                <ListBox.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <WrapPanel />
                                    </ItemsPanelTemplate>
                                </ListBox.ItemsPanel>
                                <ListBox.ItemTemplate>
                                    <DataTemplate>
                                        <Border BorderBrush="Black" BorderThickness="1" Margin="0" Padding="0" ToolTipService.ToolTip="{Binding}">
                                            <Grid>
                                                <Image Margin="0" Width="34" Height="34" Source="{Binding Path=Icon}" Stretch="Uniform" HorizontalAlignment="Center" VerticalAlignment="Center" />
                                            </Grid>
                                        </Border>
                                    </DataTemplate>
                                </ListBox.ItemTemplate>
                            </ListBox>
                        </GroupBox>

                        <GroupBox Grid.Row="2" Header="Accessories" Foreground="Chartreuse" Margin="5,0,0,0">
                            <ListBox x:Name="lstEquipmentAccessories" Grid.Row="0"
                                     ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                                     ItemsSource="{Binding Path=Accessories, Mode=TwoWay}"
                                     SelectedIndex="-1"
                                     MouseUp="lstEquipmentAccessories_MouseUp"
                                     SelectionChanged="lstEquipmentAccessories_SelectionChanged">
                                <ListBox.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <WrapPanel />
                                    </ItemsPanelTemplate>
                                </ListBox.ItemsPanel>
                                <ListBox.ItemTemplate>
                                    <DataTemplate>
                                        <Border BorderBrush="Black" BorderThickness="1" Margin="0" Padding="0" ToolTipService.ToolTip="{Binding}">
                                            <Grid>
                                                <Image Margin="0" Width="34" Height="34" Source="{Binding Path=Icon}" Stretch="Uniform" HorizontalAlignment="Center" VerticalAlignment="Center" />
                                            </Grid>
                                        </Border>
                                    </DataTemplate>
                                </ListBox.ItemTemplate>
                            </ListBox>
                        </GroupBox>
                    </Grid>
                </Grid>
            </TabItem>

            
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
            Bank / Safe
     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
            
            <TabItem Header="Bank">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="225" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>

                    <GroupBox Grid.Column="0" Header="Select Item" Foreground="Chartreuse">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <ListBox x:Name="lstBankItemList" Grid.Row="0" Margin="5"
                                     HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                     HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
                                     SelectionChanged="lstBankItemList_SelectionChanged"
                                     MouseUp="lstBankItemList_MouseUp"
                                     />
                            <ComboBox x:Name="cboBankItemPrefixList" Grid.Row="1" Margin="5"
                                      HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                      HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
                                      SelectionChanged="cboBankItemPrefixList_SelectionChanged"
                                      MouseUp="cboBankItemPrefixList_MouseUp"
                                      />
                            
                            <StackPanel Grid.Row="2">
                                <StackPanel Orientation="Horizontal">
                                    <Label Content="Stack Amount:" FontWeight="Normal" Foreground="White" Margin="5" HorizontalAlignment="Right" VerticalAlignment="Center" />
                                    <TextBox x:Name="txtBankAmount" Width="115" Margin="5" MaxLength="3" ContextMenu="{x:Null}" PreviewKeyDown="txtBankAmount_PreviewKeyDown" TextChanged="txtBankAmount_TextChanged" />
                                </StackPanel>
                                <Button x:Name="btnBankMaxItemStacks" Content="Max All Stacks" Margin="5" Click="btnBankMaxItemStacks_Click" />
                                <Button x:Name="btnBankHackItemStacks" Content="Set All Stacks To 999" Margin="5" Click="btnBankHackItemStacks_Click" />
                                <StackPanel Orientation="Horizontal">
                                    <Button x:Name="btnClearBank" Content="Clear Bank" Margin="5" Click="btnClearBank_Click" />
                                    <Button x:Name="btnClearSafe" Content="Clear Safe" Margin="5" Click="btnClearSafe_Click" />
                                </StackPanel>
                            </StackPanel>
                        </Grid>
                    </GroupBox>

                    <Grid Grid.Column="1">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>

                        <GroupBox Grid.Row="0" Header="Bank" Foreground="Chartreuse" Margin="5,0,0,0">
                            <ListBox x:Name="lstBankItems" Grid.Row="0"
                                     ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                                     ItemsSource="{Binding Path=Bank1, Mode=TwoWay}"
                                     SelectedIndex="-1"
                                     SelectionChanged="lstBankItems_SelectionChanged"
                                     MouseRightButtonUp="lstBankItems_MouseRightButtonUp">
                                <ListBox.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <WrapPanel />
                                    </ItemsPanelTemplate>
                                </ListBox.ItemsPanel>
                                <ListBox.ItemTemplate>
                                    <DataTemplate>
                                        <Border BorderBrush="Black" BorderThickness="1" Margin="0" Padding="0" ToolTipService.ToolTip="{Binding}">
                                            <Grid>
                                                <Image Margin="0" Width="34" Height="34" Source="{Binding Path=Icon}" Stretch="Uniform" HorizontalAlignment="Center" VerticalAlignment="Center" />
                                                <Border BorderThickness="0" Background="#99000000" Height="14" HorizontalAlignment="Stretch" VerticalAlignment="Bottom">
                                                    <Label Content="{Binding Path=Count}" Foreground="White" HorizontalAlignment="Left" VerticalAlignment="Bottom" Padding="0" Margin="0" />
                                                </Border>
                                            </Grid>
                                        </Border>
                                    </DataTemplate>
                                </ListBox.ItemTemplate>
                            </ListBox>
                        </GroupBox>

                        <GroupBox Grid.Row="1" Header="Safe" Foreground="Chartreuse" Margin="5,0,0,0">
                            <ListBox x:Name="lstSafeItems" Grid.Row="0"
                                     ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                                     ItemsSource="{Binding Path=Bank2, Mode=TwoWay}"
                                     SelectedIndex="-1"
                                     SelectionChanged="lstSafeItems_SelectionChanged"
                                     MouseRightButtonUp="lstSafeItems_MouseRightButtonUp">
                                <ListBox.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <WrapPanel />
                                    </ItemsPanelTemplate>
                                </ListBox.ItemsPanel>
                                <ListBox.ItemTemplate>
                                    <DataTemplate>
                                        <Border BorderBrush="Black" BorderThickness="1" Margin="0" Padding="0" ToolTipService.ToolTip="{Binding}">
                                            <Grid>
                                                <Image Margin="0" Width="34" Height="34" Source="{Binding Path=Icon}" Stretch="Uniform" HorizontalAlignment="Center" VerticalAlignment="Center" />
                                                <Border BorderThickness="0" Background="#99000000" Height="14" HorizontalAlignment="Stretch" VerticalAlignment="Bottom">
                                                    <Label Content="{Binding Path=Count}" Foreground="White" HorizontalAlignment="Left" VerticalAlignment="Bottom" Padding="0" Margin="0" />
                                                </Border>
                                            </Grid>
                                        </Border>
                                    </DataTemplate>
                                </ListBox.ItemTemplate>
                            </ListBox>
                        </GroupBox>
                    </Grid>
                </Grid>
            </TabItem>

        </TabControl>
    </Grid>
</UserControl>
